Skip to content

cleanup stray scheduler processes #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

gwleuverink
Copy link
Contributor

This PR ensures that only one scheduler process runs at a time and that it is properly terminated when needed. The changes add functionality to explicitly kill the scheduler process, preventing potential orphaned processes

Potentially related: NativePHP/laravel#542

@gwleuverink
Copy link
Contributor Author

After this fix I'm experiencing something else:

Screenshot 2025-08-07 at 14 55 28

This originates from a different place altogether (the tree-kill process termination calls)
It might be this problem was already there but only now becomes apparent now the fix for stray scheduler processes is in place

It's hard to debug though, because it only happens after my Mac wakes up from a particularly long sleep.

Will revert this PR back to draft and do some more digging when it occurs again

@gwleuverink gwleuverink marked this pull request as draft August 7, 2025 13:35
@gwleuverink gwleuverink force-pushed the fix/scheduler-process-EBADF-error branch from 8eef63c to d83caac Compare August 7, 2025 14:48
@gwleuverink
Copy link
Contributor Author

After these changes I haven't seen any EBADF errors raised.

The EPIPE error is caused by terminating a composer native:dev process. Which is a different issue we should address separately.

I'll keep a instance running and see if this resolves the issue definitively

@gwleuverink gwleuverink marked this pull request as ready for review August 7, 2025 21:14
@gwleuverink
Copy link
Contributor Author

I'll keep a instance running and see if this resolves the issue definitively

No more EBADF errors after several days of running the app

@SRWieZ
Copy link
Member

SRWieZ commented Aug 12, 2025

Did you close the lid and reopen your Mac ?

If you considering fixed. I would recompile my app with this PR to test it.

@gwleuverink
Copy link
Contributor Author

Yes with extended sleep overnight. Please do test! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants